package com.zhenzhen.xszhcp.serviceImpl;

import com.zhenzhen.xszhcp.mapper.KcblMapper;
import com.zhenzhen.xszhcp.model.Kcbl;
import com.zhenzhen.xszhcp.service.KcblService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class KcblServiceImpl implements KcblService {
    @Autowired
    private KcblMapper mapper;
    @Override
    public List<Kcbl> getkcbllist() {
        return mapper.getkcbllist();
    }

    @Override
    public int upkcbl(Kcbl kcbl) {
        return mapper.updateByPrimaryKeySelective(kcbl);
    }

    @Override
    public int insertkcbl(Kcbl kcbl) {
        return mapper.insertSelective(kcbl);
    }

    @Override
    public int delkcbl(int id) {
        return mapper.deleteByPrimaryKey(id);
    }

    @Override
    public Kcbl getkcbibyid(int id) {
        return mapper.selectByPrimaryKey(id);
    }
}
